package com.pai4j.client.service;

import com.pai4j.common.bean.PAIPageResponseBeanUtil;
import com.pai4j.remote.search.SearchEngineClient;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class SearchService {

    @Resource
    private SearchEngineClient searchEngineClient;

    /**
     * 搜索
     *
     * @param type       搜索类型
     * @param userId     用户ID
     * @param query      搜索内容
     * @param page       页码
     * @param size       页大小
     * @return 搜索结果
     */
    public PAIPageResponseBeanUtil query(String query,Integer type,String userId, Integer page, Integer size) {

        return searchEngineClient.query(query,type, userId,  page, size);
    }
}
